libname ecrit "..";

data test;
set ecrit.freq;
fr_p=f_p/f;
run;
proc sort data=test;
by idposte1;
run;
proc means data=test;
by idposte1;
var fr_p f_p f;
output out=ecrit.freq_boot_id mean=fr_p f_p f std=sfr_p sf_p sf;
run;
proc univariate data=ecrit.freq_boot_id;
var fr_p f_p f sfr_p sf_p sf;
run;


data test2;
set ecrit.kurt;
interq=interq/100;
kurt=kurt+3;
run;

proc sort data=test2;
by idposte1;
run;
proc means data=test2 noprint;
by idposte1;
var kurt interq q2 q1 q3 p10 p90;
output out=ecrit.size_boot_id mean=m_kur m_interq m_q2 m_q1 m_q3 m_p10 m_p90 std=s_kur s_interq s_q2 s_q1 s_q3 s_p10 s_p90;
run;
proc means data=ecrit.size_boot_id;
var m_kur m_interq m_q2 m_q1 m_q3 m_p10 m_p90 s_kur s_interq s_q2 s_q1 s_q3 s_p10 s_p90;
run;
proc univariate data=ecrit.size_boot_id;
var m_kur m_interq m_q2 m_q1 m_q3 m_p10 m_p90 s_kur s_interq s_q2 s_q1 s_q3 s_p10 s_p90;
run;


proc sort data=ecrit.size_boot_id;
by idposte1;
run;
proc sort data=ecrit.freq_boot_id;
by idposte1;
run;
data ecrit.moment_boot_id;
merge ecrit.size_boot_id ecrit.freq_boot_id;
by idposte1;
drop _TYPE_ _FREQ_;
run;

data poids;
set ecrit.poids_idposte5_9414 ;
rename idposte_p=idposte1;
run;
proc sort data=poids;
by idposte1;
run;

data ecrit.moment_boot_id;
merge poids ecrit.moment_boot_id(in=a);
by idposte1;
if a;
run;

PROC EXPORT DATA= ecrit.moment_boot_id 
            OUTFILE= "...\stat_94_2014_kurto.xlsx" 
            DBMS=EXCEL REPLACE;
     SHEET="all"; 
RUN;


proc univariate data=ecrit.moment_boot_id ;
weight pond_c5;
var f;
run;
